<div class="menu-wiki-pages-tree tree-menu--container" data-selected-page="<%= @page.present? ? @page.slug : '' %>">
  <div class="main-menu--segment-header ellipsis"><%= t('label_table_of_contents') %></div>
  <% cache([@project, @project.wiki]) do %>
    <% pages = @project.wiki.pages.order(Arel.sql('title')).includes(:project)
       pages_by_parent_id = pages.group_by(&:parent_id) %>
    <%= render_page_hierarchy(pages_by_parent_id, nil, timestamp: false) %>
  <% end %>
</div>
